


const changeRem = content => {
    return content.replace(/(?<=:).+(?=px)/gm, item => {
        const val = item.trim();
        if (val === '0') {
            return `${val}`;
        }
        return `${(val / 100).toFixed(2).replace(/0$/, '')}`;
    }).replace(/px/gm,'rem');
}
const changePx = content => {
    return content.replace(/(?<=:).+(?=px)/gm, item => {
        const val = item.trim();
        if (val === '0') {
            return `${val}`;
        }
        return `${val * 2}`;
    });
}
module.exports = {
    changeRem,
    changePx,
};

